-
Notifications
You must be signed in to change notification settings - Fork 94
Allow GPUTexture where GPUTextureView is used #4407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@@ -62,7 +62,8 @@ class F extends AllFeaturesMaxLimitsGPUTest { | |||
texture: GPUTexture, | |||
textureViewDescriptor?: GPUTextureViewDescriptor | |||
): GPURenderPassColorAttachment { | |||
const view = texture.createView(textureViewDescriptor); | |||
const { bindTextureResource = false } = this.params as { bindTextureResource?: boolean }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I might be better to just pass in bindTextureResource
? This is not type safe. If the parameters change, this will still compile, it will just always be false.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did that because textureViewDescriptor
was optional. Maybe I should update getColorAttachment
parameters with something like getColorAttachment(texture, {textureViewDescriptor, bindTextureResource})
instead...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@greggman I've fixed this in latest commit.
@@ -76,7 +77,8 @@ class F extends AllFeaturesMaxLimitsGPUTest { | |||
texture: GPUTexture, | |||
textureViewDescriptor?: GPUTextureViewDescriptor | |||
): GPURenderPassDepthStencilAttachment { | |||
const view = texture.createView(textureViewDescriptor); | |||
const { bindTextureResource = false } = this.params as { bindTextureResource?: boolean }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
3f4bf23
to
a4b0960
Compare
a4b0960
to
7e20a09
Compare
Spec PR: gpuweb/gpuweb#5228
Requirements for PR author:
.unimplemented()
./** documented */
and new helper files are found inhelper_index.txt
.Requirements for reviewer sign-off:
When landing this PR, be sure to make any necessary issue status updates.